import { createApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia'
//  重置样式： 让html标签在浏览器中有相同的表现
import 'normalize.css'
// 公共样式
import '@/assets/styles/common.less'
const pinia = createPinia()

import router from './router'
import LazyImg from '@/directive'
const app = createApp(App)

// v3 的全局注册 (1)
// import XtxSkeleton from '@/components/XtxSkeleton.vue';
// app.component('XtxSkeleton',XtxSkeleton)
// 方法(2)
import XtxUI from '@/components/index'
// 自动调用 install ,并传入app 给形参

// 插件持久化
import piniaPersist from 'pinia-plugin-persist'
pinia.use(piniaPersist)
app.use(XtxUI)
app.use(pinia)
app.use(router)
app.use(LazyImg)
app.mount('#app')
